import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询账户册方案
 * @param {*} query
 * @returns
 */
export function findAccountBookScheme(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/findAccountBookScheme',
    method: 'get',
    params: query
  })
}


/**
 * 账户册组成因子全部数据
 * @param {*} query
 * @returns
 */
export function fingfactorcodename(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/fingfactorcodename',
    method: 'get',
    params: query
  })
}


/**
 * 账户册组成因子已选选项
 * @param {*} query
 * @returns
 */
export function fingfactorcodenamein(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/fingfactorcodenamein',
    method: 'get',
    params: query
  })
}

/**
 * 账户册组成因子项修改
 * @param {*} data
 * @returns
 */
export function addfactor(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/addfactor',
    method: 'post',
    data
  })
}


/**
 * 单行删除
 * @param {*} query
 * @returns
 */
export function deleteAccountBookScheme(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/deleteAccountBookScheme',
    method: 'get',
    params: query
  })
}

/**
 * 添加账户册方案
 * @param {*} data
 * @returns
 */
export function addAccountBookScheme(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/addAccountBookScheme',
    method: 'post',
    data
  })
}

/**
 * 修改账户册方案
 * @param {*} data
 * @returns
 */
export function updateAccountBookScheme(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/updateAccountBookScheme',
    method: 'post',
    data
  })
}

/**
 * 多条删除
 * @param {*} data
 * @returns
 */
export function deleteAccountBookSchemeBatch(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/deleteAccountBookSchemeBatch',
    method: 'post',
    data
  })
}


/**
 * 方案复制
 * @param {*} data 
 * @returns 
 */
export function copycoaplan(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/copycoaplan',
    method: 'post',
    data
  })
}



/**
 * 获取方案编码
 * @param {*} query
 * @returns
 */
 export function addcoaPlanCode(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountBookScheme/addcoa_plan_code',
    method: 'get',
    params: query
  })
}

